package com.vcc.service.boss.response.userCard;

import cn.dev33.satoken.stp.StpUtil;
import com.vcc.data.entity.CardType;
import com.vcc.data.entity.UserCardWallet;
import com.vcc.service.boss.response.baseVo.BossBaseVo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;

@EqualsAndHashCode(callSuper = true)
@Data
@Setter
@Getter
public class UserCardWalletVoBoss extends BossBaseVo implements Serializable {

    private String code;

    private Integer sort;

    private String sectionNo;

    private String channelName;

    private BigDecimal dealerMinAmount;

    private BigDecimal amount;

    private Integer openCardOnLineCount;

    private BigDecimal exchangeRate;

    private Integer verifyOpenCardStatus;

    private Integer verifyRechargeCardStatus;

    private Integer verifyOutCardStatus;

    private Integer verifyCloseCardStatus;

    private Integer verifyFreezeUnFreezeCardStatus;

    private BigDecimal authFee;

    private BigDecimal authFeeRate;

    private BigDecimal failFee;

    private BigDecimal failFeeRate;

    private BigDecimal minAuthFee;

    private BigDecimal minAuthFeeRate;

    private BigDecimal refundFee;

    private BigDecimal refundFeeRate;

    private BigDecimal reversalFee;
    private BigDecimal reversalFeeRate;

    private BigDecimal crossBorderFee;

    private BigDecimal crossBorderFeeRate;




    public UserCardWalletVoBoss() {
    }

    public UserCardWalletVoBoss(CardType card, UserCardWallet userCardWallet) {
        super.setId(userCardWallet.getId());
        this.code = card.getCode();
        this.sort = card.getSort();
        this.sectionNo = card.getSectionNo();
        this.dealerMinAmount = card.getDealerMinAmount();
        this.amount = userCardWallet.getAmount();
        this.openCardOnLineCount = userCardWallet.getOpenCardOnLineCount();
        this.exchangeRate = userCardWallet.getExchangeRate();
        this.verifyOpenCardStatus = userCardWallet.getVerifyOpenCardStatus();
        this.verifyRechargeCardStatus = userCardWallet.getVerifyRechargeCardStatus();
        this.verifyOutCardStatus = userCardWallet.getVerifyOutCardStatus();
        this.verifyCloseCardStatus = userCardWallet.getVerifyCloseCardStatus();
        this.verifyFreezeUnFreezeCardStatus = userCardWallet.getVerifyFreezeUnFreezeCardStatus();
        this.authFee = userCardWallet.getAuthFee();
        this.authFeeRate = userCardWallet.getAuthFeeRate();
        this.failFee = userCardWallet.getFailFee();
        this.failFeeRate = userCardWallet.getFailFeeRate();
        this.minAuthFee = userCardWallet.getMinAuthFee();
        this.minAuthFeeRate = userCardWallet.getMinAuthFeeRate();
        this.refundFee = userCardWallet.getRefundFee();
        this.refundFeeRate = userCardWallet.getRefundFeeRate();
        this.reversalFee = userCardWallet.getReversalFee();
        this.reversalFeeRate = userCardWallet.getReversalFeeRate();
        this.crossBorderFee = userCardWallet.getCrossBorderFee();
        this.crossBorderFeeRate = userCardWallet.getCrossBorderFeeRate();
        this.channelName = StpUtil.hasPermission("channel:view") ? card.getChannelName() : "";
    }
}
